﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace drawing_print.form
{
    public partial class settings : Form
    {
        public settings()
        {
            InitializeComponent();
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            if (util.drawing.isMosaic)
            {
                this.rb2.Checked = true;
                this.rb1.Checked = false;
            }
            else
            {
                this.rb2.Checked = false;
                this.rb1.Checked = true;
            }
            if (util.drawing.isReverse)
            {
                this.rb4.Checked = true;
                this.rb3.Checked = false;
            }
            else
            {
                this.rb4.Checked = false;
                this.rb3.Checked = true;
            }
        }


        private void Rb1_CheckedChanged(object sender, EventArgs e)
        {
            util.drawing.isMosaic = false;
            //console();
        }

        private void Rb2_CheckedChanged(object sender, EventArgs e)
        {
            util.drawing.isMosaic = true;
            //console();
        }

        private void Rb3_CheckedChanged(object sender, EventArgs e)
        {
            util.drawing.isReverse = false;
            //console();
        }

        private void Rb4_CheckedChanged(object sender, EventArgs e)
        {
            util.drawing.isReverse = true;
            //console();
        }

        private void console()
        {
            Console.WriteLine("遮挡：" +  (util.drawing.isMosaic ? "马赛克" : "白色"));
            Console.WriteLine("反正：" + (util.drawing.isReverse ? "反选" : "正选"));
        }
    }
}
